<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no" />
	<title>首页</title>
	<link rel="stylesheet" type="text/css" href="../c/aui.css" />
	<link rel="stylesheet" type="text/css" href="../c/suxiangw.css" />
</head>
<style>
	body{
		background: #000;
	}
	#content{
		background: #1B1D29;
		padding: 0.35rem;
		font-size: 0.75rem;
		color: #fff;
		height: 8rem;
		letter-spacing:2px;
		border-radius: 0.25rem;
	}
	#input{
		background: #1B1D29;
		padding: 0.35rem;
		font-size: 0.75rem;
		letter-spacing:2px;
		border-radius: 0.25rem;
		margin-top: 0.75rem;
		color: #fff;
	}
</style>

<body>
	<div class="aui-content aui-content-padded">
		<h2 class="aui-margin-b-15 aui-margin-t-15 aui-font-size-14">描述问题</h2>
		<textarea id="content"  maxlength="255"  placeholder="请填写描述问题"></textarea>
		<h2 class="aui-margin-b-15 aui-margin-t-15 aui-font-size-14">联系方式</h2>
		<input type="text" id="input" name="" value="" placeholder="请填写联系方式">
		<div class="aui-btn sx-btn aui-btn-block aui-margin-t-15" Tapmode onclick="a()">提交</div>
	</div>
</body>
<script type="text/javascript" src="../j/api.js"></script>
<script type="text/javascript">
	apiready = function() {
		api.parseTapmode;
		$('#input').val(_getPrefs('_user').mobile)
		setTimeout(function() {
			document.getElementById("content").focus()
		}, 500)
	}
	function a(){
		var content = $('#content').val();
		if(!content){
			return _msg('请填写描述问题');
		}
		var lianxi = $('#input').val();
		if(!lianxi){
			return _msg('请填写联系方式');
		}
		document.activeElement.blur();
		_loading();
		_ajax('member/yijian',function(ret,err){
			_loadingCloes();
			if(ret){
				if(ret.ret){
					_alert(ret.ret,function(ret,err){
						_close();
					})
				}else{
					_alert(ret.err,function(ret,err){
						document.getElementById("content").focus()
					});
				}
			}else{
				_alert(JSON.stringify(err))
			}
		},{content:content,lianxi:lianxi})
	}
</script>

</html>
